// manages interactions of the player during a single session
package game.info;

public class Player {
	
	//EXAMPLES//
	public static String petName = "blank"; //For example purposes
	public static boolean hasPet = false; //For example purposes
	
	//DEFAULT INFORMATION//
	public static String playerName;
	public static String playerInput;
	public static int playerLocation = 1; //Get this variable to read the location of the player
	public static int playerVerdict = 0; //Get this variable to determine player outcome
	public static boolean hasOpenedDoor = false; //Get this variable to determine if the player can proceed to the next room 
	
	//ROOM ONE//
	public static String[]    items_1 = {"a desk","pliers"  ,"a paperclip","a bent paperclip","a door"};
	public static  boolean[][] state_1 = {{false} ,{false}   ,{false}      ,{false}           ,{false}};
	//									  open?   taken?	 taken?			used?			   open?
	public static String[][]  where_1 = {{"room"},{"a desk"},{"room"}     ,{"a paperclip"}   ,{"room"}};
	//public static boolean[][] shows_1 = {{true}  ,{"opened"},{"any"}      ,{"pliers"}              ,{"any"}};
	
	public static String roomOne = "	You are standing in the confines of a small, cream-colored windowless bedroom.\n	To the NORTH of you is a closed door. To the WEST of you is a small desk with a closed drawer.";
	public static boolean hasPliers = false;
	public static boolean hasPaperclip = false;
	public static boolean hasBentPaperclip = false;
	public static boolean hasOpenedDesk = false;
	
	public static boolean[] exits = {false,false,false};
	
	
	//ROOM TWO//
	public static String[]    items_2 = {"a bed" ,"a pillow","a wrench","a drawer","a handkerchief","code"                            ,"a lamp"    ,"an alarm clock","a bolted safe","a key"              ,"a gun"   ,"note"};
	public static boolean[][] state_2 = {{false} ,{false}   ,{false}   ,{false}   ,{false}         ,{false}          ,{false}         ,{false}     ,{false}         ,{false}        ,{false}              ,{false}   ,{false}};
	//                                   pushed?  opened?    taken?     open?      taken?          
	public static String[][]  where_2 = {{}      ,{"room"}  ,{"a bed"} ,{"room"}  ,{"a drawer"}    ,{"a handkerchief","a bolted safe"},{"a drawer"},{"a drawer"}    ,{"room"}       ,{"a pillow","a safe"},{"a safe"},{"a safe"}};
	//public static boolean[][] shows_2 = {{}      ,{"any"}   ,{"pushed"},{"any"}   ,{"open"}        ,{"examined"      ,"examined"}     ,{"any"}     ,{"any"}         ,{"any"}        ,{"open"    ,"open"}  ,{"open"}  ,{"open"}};

	public static String roomTwo = "	You are standing in the confines of a large, green bedroom.\n	To the WEST of you is a set of closed drawers, and a mattress. To the NORTH of you is a small combination safe, bolted to the floor. To the EAST of you is a closed door.";
	public static boolean hasWrench = false;
	public static boolean hasKey = false;
	public static boolean hasSpoon = false;
	public static boolean hasKnife = false;
	public static boolean hasGun = false;
	public static boolean hasOpenedDrawer = false;
	public static boolean hasUnboltedSafe = false;
	public static boolean hasGuiltyCombination = false;
	public static boolean hasInnocentCombination = false;

	public static String[]    items_3 = {""};
	public static boolean[][] state_3 = {{}};
	public static String[]    where_3 = {""};
	public static boolean[][] shows_3 = {{}};

	//ROOM 3//
	public static String roomThree = "	You are standing in the confines of a grand dining room.\n 	In the center of a room sits a dining table with a candelabra, a bottle of wine,  a small copper cauldron full of soup, and a ladle. At each seat, there is a porcelain soup bowl, dining utensils, a napkin, and a wine glass decorated with a lemon slice. To the SOUTH of you is the door. To the EAST of you lies some kitchen cabinets.";
	public static boolean hasCandlelabra = false;
	public static boolean hasLitCandlelabra = false;
	public static boolean hasCauldron = false;
	public static boolean hasEmptiedCauldron = false;
	public static boolean hasButterknife = false;
	public static boolean hasWine = false;
	public static boolean hasEmptiedWine = false;
	public static boolean hasBottleneckKnife = false;
	public static boolean hasNapkins = false;
	public static boolean hasLemons = false;
	public static boolean hasAcidBattery = false;
	public static boolean hasDrenchedRug = false;
	public static boolean hasOpenedCabinets = false;



	//OTHER//
	//public static String[] items_1 = {"a desk","a pair of pliers","a paperclip","a door2"};
	//public static String[] items_2 = {};

	//public static String[] items_1 = {"a desk","a pair of pliers","a paperclip","a door"};
	//public static String[] where_1 = {"room"  ,"a desk"          ,"room"       ,"room"};

	//public static String[] items_2 = {"a bed"};
	//public static String[] where_2 = {};


	//EXAMPLE METHODS//
	public static String getPetName () {
		return petName; //Calling on the get method will return the petName
	}
	
	public static void setPetName (String petName) {
		Player.petName = petName; //Calling on the set method will allow the player to alter player variable petName
	}
	
	public static boolean getHasPet() {
		return hasPet; //Calling on this get method will return whether the player has a pet or not
	}
	
	public static void setHasPet(boolean hasPet) {
		Player.hasPet = hasPet; //Calling on the get method will set the whether the player has a pet or not
	}
	
	//DEFAULT METHODS//
	
	public static String getPlayerInput() {
		return playerInput;
	}
	public static void setPlayerInput(String playerInput) {
		Player.playerInput = playerInput;
	}
	public static boolean[] getExits () {
		return exits;
	}
	
	public static void setExits (boolean[] exits) {
		Player.exits = exits;
	}
	public static String getPlayerName () {
		return playerName;
	}
	
	public static void setPlayerName (String playerName) {
		Player.playerName = playerName;
	}
	
	public static int getPlayerLocation () {
		return playerLocation;
	}
	
	public static void setPlayerLocation (int playerLocation) {
		Player.playerLocation = playerLocation;
	}
	
	public static int getPlayerVerdict () {
		return playerVerdict;
	}
	
	public static void setPlayerVerdict (int playerVerdict) {
		Player.playerVerdict = playerVerdict;
	}

	public static boolean getHasOpenedDoor () {
		return hasOpenedDoor;
	}
	
	public static void setHasOpenedDoor (boolean hasOpenedDoor) {
		Player.hasOpenedDoor = hasOpenedDoor;
	}
	
	//ROOM ONE//
	public static String getRoomOne () {
		if (hasOpenedDesk){ roomOne = roomOne.replace("small desk with a closed drawer.", "small desk with an opened drawer."); }
		return roomOne;
	}
	
	public static boolean getHasPliers () {
		return hasPliers;
	}
	
	public static void setHasPliers (boolean hasPliers) {
		Player.hasPliers = hasPliers;
	}
	
	public static boolean getHasPaperclip () {
		return hasPaperclip;
	}
	
	public static void setHasPaperclip (boolean hasPaperclip) {
		Player.hasPaperclip = hasPaperclip;
	}
	
	public static boolean getHasBentPaperclip(){
		return hasBentPaperclip;

	}
	
	public static void setHasBentPaperclip(boolean hasBentPaperclip){
		Player.hasBentPaperclip = hasBentPaperclip;
	}
	
	public static boolean getHasOpenedDesk(){
		return hasOpenedDesk;
	}
		
	public static void setHasOpenedDesk(boolean hasOpenedDesk){
		Player.hasOpenedDesk = hasOpenedDesk;
	}
	
	//ROOM TWO//
	public static String getRoomTwo () {
		if (hasUnboltedSafe) {roomTwo = roomTwo.replace("small combination safe, bolted to the floor.","small combination safe, sitting freely."); }
		if (hasOpenedDrawer) {roomTwo = roomTwo.replace("set of closed drawers,","set of rifled-through drawers,"); }
		return roomTwo;
	}
	
	public static boolean getHasWrench () {
		return hasWrench;
	}
	
	public static void setHasWrench (boolean hasWrench) {
		Player.hasWrench = hasWrench;
	}
	
	public static boolean getHasKey () {
		return hasKey;
	}
	
	public static void setHasKey (boolean hasKey) {
		Player.hasKey = hasKey;
	}
	
	public static boolean getHasSpoon () {
		return hasSpoon;
	}
	
	public static void setHasSpoon (boolean hasSpoon) {
		Player.hasSpoon = hasSpoon;
	}
	
	public static boolean getHasKnife(){
		return hasKnife;
	}
	
	public static void setHasKnife (boolean hasKnife){
		Player.hasKnife = hasKnife;
	}
	
	public static boolean getHasGun (){
		return hasGun;
	}
		
	public static void setHasGun (boolean hasGun){
		Player.hasGun = hasGun;
	}
	
	public static boolean getHasOpenedDrawer () {
		return hasOpenedDrawer;
	}
	
	public static void setHasOpenedDrawer (boolean hasOpenedDrawer) {
		Player.hasOpenedDrawer = hasOpenedDrawer;
	}
	
	public static boolean getHasUnboltedSafe () {
		return hasUnboltedSafe;
	}
	
	public static void setHasUnboltedSafe (boolean hasUnboltedSafe) {
		Player.hasUnboltedSafe = hasUnboltedSafe;
	}
	
	public static boolean getHasGuiltyCombination () {
		return hasGuiltyCombination;
	}
	
	public static void setHasGuiltyCombination (boolean hasGuiltyCombination) {
		Player.hasGuiltyCombination = hasGuiltyCombination;
	}
	
	public static boolean getHasInnocentCombination () {
		return hasInnocentCombination;
	}
	
	public static void setHasInnocentCombination (boolean hasInnocentCombination) {
		Player.hasInnocentCombination = hasInnocentCombination;
	}
	
	//ROOM 3//
	public static String getRoomThree (){
		if(hasLemons) {roomThree = roomThree.replace("wine glass decorated with a lemon slice.", "wine glass."); }
		if(hasCandlelabra) {roomThree = roomThree.replace("a candelabra", ""); }
		if(hasCauldron) {roomThree = roomThree.replace("a small copper cauldron full of soup,", ""); roomThree = roomThree.replace("an empty copper cauldron,", ""); }
		if(hasEmptiedCauldron) {roomThree = roomThree.replace("a small copper cauldron full of soup", "an empty copper cauldron,"); roomThree = roomThree.replace("a porcelain soup bowl", "a full porcelain soup bowl"); }
		if(hasWine) {roomThree = roomThree.replace("a bottle of wine", ""); roomThree.replace("an empty bottle of wine", ""); }
		if(hasEmptiedWine) {roomThree = roomThree.replace("a bottle of wine", "an empty bottle of wine"); roomThree = roomThree.replace("wine glass", "a full wine glass"); }
		if(hasNapkins) {roomThree = roomThree.replace("a napkin, ", ""); }
		if (hasOpenedCabinets) {roomThree = roomThree.replace("kitchen cabinets", "opened kitchen cabinets");}
		return roomThree;
	}
	
	public static boolean getHasCandlelabra () {
		return hasCandlelabra;
	}
	
	public static void setHasCandlelabra (boolean hasCandlelabra) {
		Player.hasCandlelabra = hasCandlelabra;
	}
	
	public static boolean getHasLitCandlelabra () {
		return hasLitCandlelabra;
	}
	
	public static void setHasLitCandlelabra (boolean hasLitCandlelabra) {
		Player.hasLitCandlelabra = hasLitCandlelabra;
	}
	
	public static boolean getHasCauldron () {
		return hasCauldron;
	}

	public static void setHasCauldron (boolean hasCauldron) {
		Player.hasCauldron = hasCauldron;
	}
	
	public static boolean getHasEmptiedCauldron () {
		return hasEmptiedCauldron;
	}
	
	public static void setHasEmptiedCauldron (boolean hasEmptiedCauldron) {
		Player.hasEmptiedCauldron = hasEmptiedCauldron;
	}
	
	public static boolean getHasButterknife () {
		return hasButterknife;
	}
	
	public static void setHasButterknife (boolean hasButterknife) {
		Player.hasButterknife = hasButterknife;
	}
	
	public static boolean getHasWine () {
		return hasWine;
	}

	public static void setHasWine (boolean hasWine) {
		Player.hasWine = hasWine;
	}
	
	public static boolean getHasEmptiedWine () {
		return hasEmptiedWine;
	}

	public static void setHasEmptiedWine (boolean hasEmptiedWine) {
		Player.hasEmptiedWine = hasEmptiedWine;
	}
	
	public static boolean getHasBottleneckKnife () {
		return hasBottleneckKnife;
	}
	
	public static void setHasBottleneckKnife (boolean hasBottleneckKnife) {
		Player.hasBottleneckKnife = hasBottleneckKnife;
	}
	
	public static boolean getHasNapkins () {
		return hasNapkins;
	}

	public static void setHasNapkins (boolean hasNapkins) {
		Player.hasNapkins = hasNapkins;
	}
	
	public static boolean getHasLemons () {
		return hasLemons;
	}
	
	public static void setHasLemons (boolean hasLemons) {
		Player.hasLemons = hasLemons;
	}
	
	public static boolean getHasAcidBattery () {
		return hasAcidBattery;
	}

	public static void setHasAcidBattery (boolean hasAcidBattery) {
		Player.hasAcidBattery = hasAcidBattery;
	}
	
	public static boolean getHasDrenchedRug () {
		return hasDrenchedRug;
	}
	
	public static void setHasDrenchedRug (boolean hasDrenchedRug) {
		Player.hasDrenchedRug = hasDrenchedRug;
	}
	
	public static boolean getHasOpenedCabinets () {
		return hasOpenedCabinets;
	}
	
	public static void setHasOpenedCabinets (boolean hasOpenedCabinets) {
		Player.hasOpenedCabinets = hasOpenedCabinets;
	}
	
}

/*public String[][][][] newData() {//default room setups
	
	String room = "1";
	String[] gotten = {};
	// main game data
	String[]   items_1 = {"a desk","a pair of pliers"          ,"a paperclip"                ,"a door2"                          };
	String[]   where_1 = {"W"     ,"a desk"                    ,"E"                          ,"N"                                };
	String[]   state_1 = {"closed","takable"                   ,"takable"                    ,"locked"                           };
	
	String[][] needs_1 = {{"0"}   ,{"1","box","opened","taken"},{"1","pliers","taken","bent"},{"1","paperclip","bent","unlocked"}};
	
			
	String[]   items_2 = {""};
	String[]   where_2 = {};
	String[]   state_2 = {};
	
	String[][] needs_2 = {{}};
	
	
	String[][][][] rooms = {{{{room},gotten}},
							{{items_1},{where_1},{state_1},needs_1},
							{{items_2},{where_2},{state_2},needs_2}};
	
	/*room descriptions for when player says "look".
	Different objects are given individual elements*/
					// North of you is...
	//String[][] look = {{"a door.","a paperclip"
	
	/*return rooms;
}

}*/

